home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 March
/
PCWorld_2007-03_cd.bin
/
komunikace
/
acehtml
/
acehtmlfreeware.exe
/
scriptdef
/
Show My Links.sd
< prev
next >
Wrap
INI File
|
2006-09-13
|
7KB
|
324 lines
[SUBJECT]
Description=Show the user's favorite links
ImageIndex=-1
Folder=Tools
[BODY_TEXT]
;
;<script language="JavaScript"><!--
;var cookiename = '`cookie_name`';
;var urltable= new Array();
;var urlvar= new Array();
;
;function editlinks(name,scrwidth,scrheight){ startDate= new Date(); tWin = window.open(name,
;startDate.getTime(),
;"toolbar=no,location=no,resizable=no,status=no,scrollbars=yes,menubar=no,width="+ scrwidth + "height=" + scrheight);
;}
;
;
;function mylink(url,text)
;{
; this.url=url;
; this.text=text;
;}
;
;function getcookie (cookiename) {
; var cname = cookiename + "=";
; var i = 0;
; while (i < document.cookie.length) {
; var j = i + cname.length;
; if (document.cookie.substring(i, j) == cname){
; var leng = document.cookie.indexOf (";", j);
; if (leng == -1) leng = document.cookie.length;
; return unescape(document.cookie.substring(j, leng));
; }
; i = document.cookie.indexOf(" ", i) + 1;
; if (i == 0) break;
; }
; return "*";
;}
;
;
;function getlinks()
;{
; vcookie = getcookie(cookiename);
; if (vcookie=="*")
; {
; return false;
; }
; else
; {
; urlvar = vcookie.split("##");
; for (i=0; i < urlvar.length; i++)
; {
; text = urlvar[i].split("%%");
; urltable[i]= new mylink(text[0], text[1]);
; }
; return true;
; }
;}
;// --></script>
;
;
;<SCRIPT LANGUAGE="JavaScript">
;<!--
;if (top.location != location) top.location.href = location.href;
;// -->
;</SCRIPT>
;
;
;<div align="center">
;<strong>`title`</strong>
;<br>
;<script language="JavaScript"><!--
; getlinks();
; for (i=0; i < urltable.length ; i++){
; document.writeln('<a href="http://' + urltable[i].url + '" target="_blank">' + urltable[i].text + '</a><BR>');}
;// --></script>
;<br>
;
;<form name="Edit" method="Post">
;<input type="button" value="`edit_caption`" onClick="editlinks('EditMyLinks.html',600,600)">
;</form>
;</div>
;
;<br>
;
;
[`cookie_name`]
Kind=S
Value=myfavoritelinks
Group=1
[`title`]
Kind=S
Value=MY FAVORITE LINKS
[`edit_caption`]
Kind=S
Value=Edit links
[ADD_FILE]
Name=EditMyLinks.html
;<html>
;<head>
;<title>Add/Remove My Links</title>
;<script LANGUAGE="JavaScript"><!--
;var cookiename = '`cookie_name2`';
;var urltable = new Array();
;var maxcount = 10;
;var urlvar= new Array();
;
;
;function CloseWindow()
;{
; window.close();
; return true;
;}
;
;
;function link(url,text)
;{
; this.url=url;
; this.text=text;
;}
;
;function setcookie (cookiename, cookievar) {
;
; var expire = new Date ();
; document.cookie = cookiename + "= " + escape (cookievar) +
; "; expires=Mon, 10-Jan-2009 00:00:01 GMT; path=/;"
;}
;
;
;function getcookie (cookiename) {
; var cname = cookiename + "=";
; var i = 0;
; while (i < document.cookie.length) {
; var j = i + cname.length;
; if (document.cookie.substring(i, j) == cname){
; var leng = document.cookie.indexOf (";", j);
; if (leng == -1) leng = document.cookie.length;
; return unescape(document.cookie.substring(j, leng));
; }
; i = document.cookie.indexOf(" ", i) + 1;
; if (i == 0) break;
; }
; return "*";
;}
;
;
;
;
;function setlinks()
;{
;
; urlvar = new Array();
; if (urltable.length > 0)
; {
; for (i=0; i < urltable.length; i++)
; {
; urlvar[i]=urltable[i].url + "%%" + urltable[i].text;
;
; }
; var cookievar = urlvar.join("##");
; setcookie(cookiename,cookievar);
; }
; else
; {
; deletecookie(cookiename);
; }
; return true;
;}
;
;
;
;function getlinks()
;{
; cookievar = getcookie(cookiename);
; if (cookievar=="*")
; {
; return false
; }
; else
; {
; urlvar = cookievar.split("##");
; for (i=0; i < urlvar.length; i++)
; {
; text = urlvar[i].split("%%");
; urltable[i]= new link(text[0], text[1]);
; }
; return true;
; }
;}
;
;
;function addlink(lurl,ltext)
;{
; var i = urltable.length;
; if (i >= maxcount)
; {
; alert ("You can add maximum " + maxcount+ " links");
; }
; else
; {
; urltable[i] = new link(lurl,ltext);
; setlinks();
; window.location.reload();
; }
; return true;
;}
;
;
;function deleteurl(urlc)
;{
;
; var no = parseInt(urlc.substring(3,urlc.length),10);
;
; for (i=no; i < urltable.length; i++)
; {
; if (i == (urltable.length - 1))
; {
; urltable[i] = "";
; urltable.length -= 1;
; }
; else
; {
; urltable[i] = urltable[i+1];
; }
; }
; setlinks();
; window.location.reload();
; return true;
;}
;
;function deletecookie()
;{
; document.cookie = cookiename +"=; expires=Thu, 10-Jan-88 00:00:02 GMT";
; document.cookie = cookiename +"=; expires=Thu, 10-Jan-88 00:00:02 GMT; path=/";
; window.location.reload();
; return true;
;}
;// --></script>
;</head>
;
;<body bgcolor="#000000" text="#FFFFFF" link="#FF0000" alink="#00FF00" vlink="#0000FF">
;
;
;<div align="center">
;<u>Add / Remove Your Favorite Links</u>
;
;<form name="New" method="Post">
; http:// <input type="text" name="URL" size="20" maxlength="80"> <input type="text" name="TXT" size="20" maxlength="30">
; <input type="button" value="Add" onClick="addlink(New.URL.value,New.TXT.value)">
;</form>
;
;
;<br>
;<br>
;<br>
;<br>
;
;
;
;<form method="Post" name="Form">
;<script language="JavaScript"><!--
;getlinks();
;if (urltable.length > 0)
;{
; document.write('<table border="3" cellpadding="5" cellspacing="0">');
; document.write('<caption><strong>Available links</strong></caption>');
; document.write('<tr><th>URL</th><th>Description</th><th> </th></tr>');
;
; for (i=0; i < urltable.length ; i++)
; {
; document.writeln('<tr>');
; document.writeln('<td>');
; document.writeln('http:// <input type=text name= "url' + i + '" value="' + urltable[i].url + '" size=20 maxlength=80> </td><td>');
; document.writeln('<input type=text name= "txt' + i + '" value="' + urltable[i].text + '" size=20 maxlength=30> </td><td>');
; document.writeln('<input type=button name= "del' + i + '" value="Delete" onClick="deleteurl(this.name)"> </td>\n');
; document.writeln('</tr>\n');
; }
; document.writeln('</table>');
;}
;else
;{
; document.write('<strong>There are not available links yet!</strong>');
;}
;// --></script>
;
;</form>
;</div>
;<br>
;<br>
;
;
;
;
;<form name="Ok" method="Post">
; <div align="center">
; <input type="button" value=" Ok " onClick="CloseWindow()">
; </div>
;</form>
;<br>
;
;</body>
;</html>
[`cookie_name2`]
Kind=S
Value=myfavoritelinks
Visible=0
Group=1